<?php /* Smarty version 2.6.20, created on 2013-05-25 01:50:41
         compiled from _core/_include/manage/productsdshoww.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('modifier', 'escape', '_core/_include/manage/productsdshoww.tpl', 7, false),)), $this); ?>
function ProductSlideshoww() {
};

ProductSlideshoww.instance = function(callbackFunc) {
  var popupBox = new PopupBox(), _self = this;
  var popupBox2 = new PopupBox2();
  var model = Model.instance('<?php echo ((is_array($_tmp=@MODEL_NAME_PRODUCT_SLIDESHOWW)) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>
', '<?php echo ((is_array($_tmp=@MODEL_TITLE_PRODUCT_SLIDESHOWW)) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>
', '<?php echo ((is_array($_tmp=@MODEL_TYPE_PRODUCT)) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>
');
  
  //Create model here...
  /*var state1 = State.instance(model, 0, 'not activate');
  var state2 = State.instance(model, 1, 'receive CUS photo requirement');
  var state3 = State.instance(model, 2, 'arrange designer');
  var state4 = State.instance(model, 3, 'translate and upload CUS requirement');
  var state5 = State.instance(model, 4, 'skipped');
  var state6 = State.instance(model, 5, 'download photos, complete and send the slideshow DVD');
  var state7 = State.instance(model, 6, 'receive slideshow DVD');
  var state8 = State.instance(model, 7, 'package and deliver');
  var state9 = State.instance(model, 8, 'receive slide show DVD');
  var state10 = State.instance(model, 9, 'pick up product');
  var state11 = State.instance(model, 10, 'product picked up');
  var state12 = State.instance(model, 11, 'solve CUS problem');
  var state13 = State.instance(model, 12, 'complete product');*/
  
  var state1 = State.instance(model, 0, 'not activate');
  var state2 = State.instance(model, 1, 'arrange designer');
  var state3 = State.instance(model, 2, 'download photos, complete and send the slideshow DVD');
  var state4 = State.instance(model, 3, 'pick up product');
  var state5 = State.instance(model, 4, 'backup video tape');  
  var state6 = State.instance(model, 5, 'complete product')
  
  
  var transition1 = Transition.instance('arrange', state2, state3, '<?php echo ((is_array($_tmp=@USER_TYPE_DESIGNER)) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>
', DlmanageUtils.normal, 3);
  var transition2 = Transition.instance('completed', state3, state4, '<?php echo ((is_array($_tmp=@USER_TYPE_DESIGNER)) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>
', DlmanageUtils.mixed, 7);
  var transition3 = Transition.instance('pick up', state4, state5, '<?php echo ((is_array($_tmp=@USER_TYPE_DESIGNER)) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>
', DlmanageUtils.mixed, 7);
  var transition4 = Transition.instance('backup', state5, state6, '<?php echo ((is_array($_tmp=@USER_TYPE_DESIGNER)) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>
', DlmanageUtils.normal, 9999);
  var transition5 = Transition.instance('product fault report', state6, state3, '<?php echo ((is_array($_tmp=@USER_TYPE_CUSTOMER_SERVICE)) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>
', DlmanageUtils.normal, 15);
  
  var transition14 = Transition.instance('arrange', state2, state3, '<?php echo ((is_array($_tmp=@USER_TYPE_MANAGER)) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>
', DlmanageUtils.normal, 3);
  var transition15 = Transition.instance('completed', state3, state4, '<?php echo ((is_array($_tmp=@USER_TYPE_MANAGER)) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>
', DlmanageUtils.mixed, 7);
  var transition16 = Transition.instance('pick up', state4, state5, '<?php echo ((is_array($_tmp=@USER_TYPE_MANAGER)) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>
', DlmanageUtils.mixed, 7);
  var transition17 = Transition.instance('backup', state5, state6, '<?php echo ((is_array($_tmp=@USER_TYPE_MANAGER)) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>
', DlmanageUtils.normal, 9999);
  var transition18 = Transition.instance('product fault report', state6, state3, '<?php echo ((is_array($_tmp=@USER_TYPE_MANAGER)) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>
', DlmanageUtils.normal, 15);
  
  var transition27 = Transition.instance('arrange', state2, state3, '<?php echo ((is_array($_tmp=@USER_TYPE_ADMIN)) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>
', DlmanageUtils.normal, 3);
  var transition28 = Transition.instance('completed', state3, state4, '<?php echo ((is_array($_tmp=@USER_TYPE_ADMIN)) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>
', DlmanageUtils.mixed, 7);
  var transition29 = Transition.instance('pick up', state4, state5, '<?php echo ((is_array($_tmp=@USER_TYPE_ADMIN)) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>
', DlmanageUtils.mixed, 7);
  var transition30 = Transition.instance('backup', state5, state6, '<?php echo ((is_array($_tmp=@USER_TYPE_ADMIN)) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>
', DlmanageUtils.normal, 9999);
  var transition31 = Transition.instance('product fault report', state6, state3, '<?php echo ((is_array($_tmp=@USER_TYPE_ADMIN)) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>
', DlmanageUtils.normal, 15);
  
  transition1.operate = function(pos, callbackFunc, produce, user, date, options) { if (!options) {
                                                                                      options = {};
                                                                                    }
                                                                                    var previous = MiscUtils.clone(produce);
                                                                                    options.previous = previous;
                                                                                    var div = document.createElement('div');
                                                                                    var func1 = function() { if (!options) {
                                                                                                               options = {};
                                                                                                             }
                                                                                                             if (produce.user_account == '') {
                                                                                                               window.alert('选择一个设计师');
                                                                                                               return;
                                                                                                             }
                                                                                                             options.extra = produce.user_account;
                                                                                                             DlmanageUtils.operate(transition1, pos, callbackFunc, produce, user, date, options);
                                                                                                             popupBox._close();
                                                                                                           };
                                                                                    var func2 = function() { popupBox._close();
                                                                                                             callbackFunc();
                                                                                                           };
                                                                                    MiscUtils.dialog(popupBox, pos, div, func1, func2);
                                                                                    new DialogAssignee(div, produce, { php: '<?php echo ((is_array($_tmp=@FACTORY)) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>
/customphp/mysqlread.php', condition: 'd.vEnabled = 1 and d.type = \'<?php echo ((is_array($_tmp=@USER_TYPE_DESIGNER)) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>
\'' });
                                                                                  };

  transition14.operate = function(pos, callbackFunc, produce, user, date, options) { if (!options) {
                                                                                       options = {};
                                                                                     }
                                                                                     var previous = MiscUtils.clone(produce);
                                                                                     options.previous = previous;
                                                                                     var div = document.createElement('div');
                                                                                     var func1 = function() { if (!options) {
                                                                                                                options = {};
                                                                                                              }
                                                                                                              if (produce.user_account == '') {
                                                                                                                window.alert('选择一个设计师');
                                                                                                                return;
                                                                                                              }
                                                                                                              options.extra = produce.user_account;
                                                                                                              DlmanageUtils.operate(transition14, pos, callbackFunc, produce, user, date, options);
                                                                                                              popupBox._close();
                                                                                                            };
                                                                                     var func2 = function() { popupBox._close();
                                                                                                              callbackFunc();
                                                                                                            };
                                                                                     MiscUtils.dialog(popupBox, pos, div, func1, func2);
                                                                                     new DialogAssignee(div, produce, { php: '<?php echo ((is_array($_tmp=@FACTORY)) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>
/customphp/mysqlread.php', condition: 'd.vEnabled = 1 and d.type = \'<?php echo ((is_array($_tmp=@USER_TYPE_DESIGNER)) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>
\'' });
                                                                                   };


transition27.operate = function(pos, callbackFunc, produce, user, date, options) { if (!options) {
                                                                                    options = {};
                                                                                  }
                                                                                  var previous = MiscUtils.clone(produce);
                                                                                  options.previous = previous;
                                                                                  var div = document.createElement('div');
                                                                                  var func1 = function() { if (!options) {
                                                                                                             options = {};
                                                                                                           }
                                                                                                           if (produce.user_account == '') {
                                                                                                             window.alert('选择一个设计师');
                                                                                                             return;
                                                                                                           }
                                                                                                           options.extra = produce.user_account;
                                                                                                           DlmanageUtils.operate(transition27, pos, callbackFunc, produce, user, date, options);
                                                                                                           popupBox._close();
                                                                                                         };
                                                                                  var func2 = function() { popupBox._close();
                                                                                                           callbackFunc();
                                                                                                         };
                                                                                  MiscUtils.dialog(popupBox, pos, div, func1, func2);
                                                                                  new DialogAssignee(div, produce, { php: '<?php echo ((is_array($_tmp=@FACTORY)) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>
/customphp/mysqlread.php', condition: 'd.vEnabled = 1 and d.type = \'<?php echo ((is_array($_tmp=@USER_TYPE_DESIGNER)) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>
\'' });
                                                                                };


  model.states = [ state1, state2, state3, state4, state5, state6 ];
  model.transitions = [ transition1, transition2, transition3, transition4,transition5, transition14, transition15, transition16, transition17, transition18, transition27, transition28, transition29, transition30, transition31];

  return model;
};